|
|
Will W wrote:
>Is there a function "magicnormal" such that if A, B, C are points,
>magicnormal(A, B, C) will return the normal vector to the plane defined by
>A, B, and C? I have looked through the POV sections on functions and macros
>that return vectors and I didn't see anything, but maybe I'm not looking in
>the right place. It seems to me POV must be doing a lot of this sort of
>calculation during rendering.
>
>If there is no such built-in function, I would appreciate any thoughts on
>how to do this efficiently.
>
>
>Background (in case anyone is interested): I'm building a CSG object within
>a macro and need to carve out a concavity in one of its "faces". Points A,
>B, and C are dependent on the values fed to the macro, and I also expect
>their orientation to change when I start tweaking things upstream. About all
>I can be sure of is that the sphere I'll use to carve the face will lie on
>the line that is normal to the center point of the face.
>
> Any thoughts appreciated.
>
>
>--
>Will Woodhull
>Thornhenge, SW Oregon, USA
>willl.at.thornhenge.net
>
Here's a thought (ie. not tested idea).
try
vnormalize(vcross(B-A,C-A))
Post a reply to this message
|
|